package com.lyz.extendsdemo;

/**
 * @ClassName Teacher
 * @Description 老师类
 * @Author 2214361854
 * @Date 2022/2/18 10:36
 * @Version 1.0
 */
public class Teacher extends People{
    private String departmentName;

    public Teacher() {
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public void teach(){
        System.out.println(getName()+getDepartmentName()+"发布问题");
    }
}
